package com.nf.ch03.test05.homework;

/**
 * @author lwj
 * @date 2025-03-03
 * @vesion 1.0.0
 */
public class Payment {
    /**
     * 支付名称
     */
    private String name;
    /**
     * 金额
     */
    private Double price;

    // 构造方法
    public Payment() {}
    public Payment(String name, Double price) {
        this.name = name;
        this.price = price;
    }

    public void goPayment(){
        System.out.println("我当前使用的是"+this.name+",支付的金额为："+this.price);
    }

    // 属性
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }
}
